From: Keir Fraser Date: Wed, 9 Jan 2008 10:11:31 +0000 (+0000) Subject: x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14445^2~62 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=a24e208fb704a22322ad5869dfc9eb09a7c2cc83;p=xen.git x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with immediate byte third operand. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c index f894047068..07bc21f4ed 100644 --- a/xen/arch/x86/x86_emulate.c +++ b/xen/arch/x86/x86_emulate.c @@ -1064,6 +1064,9 @@ x86_emulate( /* Special case in Grp3: test has immediate operand. */ ea.mem.off += (d & ByteOp) ? 1 : ((op_bytes == 8) ? 4 : op_bytes); + else if ( (b == 0xf7) == 0xa4 ) + /* SHLD/SHRD with immediate byte third operand. */ + ea.mem.off++; break; case 1: ea.mem.off += insn_fetch_type(int8_t);